# coding=utf-8
# @Time    : 2018/3/13 13:49
# @Author  : Jiangxu
# @File    : search.py
# @Software: PyCharm
from django.http import HttpResponse
from django.shortcuts import render_to_response

# 表单
def search_form(request):
	return render_to_response('search_form.html')

# 接收请求数据
def search(request):
	request.encoding='utf-8'
	if 'q' in request.GET:
		message = '你搜索的内容为: ' + request.GET['q']
	else:
		message = '你提交了空表单'
	return HttpResponse(message)
